 //3_3
// displays text without space
#include<iostream>
#include<string>
bool is_binary(std::string);

int main()
{
	std::string s1;
	std::cout << "Enter text: ";
	std::getline( std::cin, s1 );
	if(is_binary(s1){
	std::cout << " Text is binary " << std::endl;
	}
	else {
		std::cout << "Text is'n binary " << std::endl;
	return 0;
}

bool is_binary(std::string s2)
{
	bool flag=false
for( int i=0; i < s2.length(); ++i )
	{
		if( '0' == s2[i] ){
			++count_1;
		} else if( '1' == s2[i] ){
		++count_0;
		}
	}
if( s2.length() == count_0 + count_1 ){
	flag=true; }
return flag;
	}
   

bool is_binary_2(std::string str)
{
   for (size_t i = 0; i < str.length(); ++i) {
      if ('1' != str[i] || '0' != str[i]) {
         return false;
      }
   }
   return true;
}